CC=g++
RANLIB=ranlib

SRC = threads.cc test15.cc #main.cc
OBJ = $(SRC:.cc=.o)

LIBSRC= threads.cc
LIBOBJ=$(LIBSRC:.cc=.o)

INCS=-I. 
CFLAGS = -Wall -g $(INCS)
LOADLIBES = -L./ 

THLIB = libthreads.a
TARGETS = test15 #main

all: $(TARGETS) 

$(TARGETS): $(OBJ) $(THLIB)

$(THLIB): $(LIBOBJ)
	$(AR) $(ARFLAGS) $@ $^
	$(RANLIB) $@

clean:
	$(RM) $(TARGETS) $(OSMLIB) $(OBJ) $(LIBOBJ) *~ *core

depend:
	makedepend -- $(CFLAGS) -- $(SRC) $(LIBSRC)

